package com.mz.ozy.activity.info;

import android.os.Bundle;
import android.widget.LinearLayout;

import com.just.agentweb.AgentWeb;
import com.mz.ozy.R;
import com.mz.ozy.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

public class InfomationActivity extends BaseActivity {
    public static String sWebUrl;

    @BindView(R.id.ll_H5Page)
    LinearLayout mLlH5Page;
    AgentWeb agentWeb;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_infomation);
        ButterKnife.bind(this);
        setTitleBarMargin();
        agentWeb = AgentWeb.with(this)
                .setAgentWebParent(mLlH5Page, new LinearLayout.LayoutParams(-1, -1))
                .useDefaultIndicator()
                .createAgentWeb()
                .ready()
                .go(sWebUrl);

    }

    @Override
    protected void onPause() {
        agentWeb.getWebLifeCycle().onPause();
        super.onPause();
    }

    @Override
    protected void onResume() {
        agentWeb.getWebLifeCycle().onResume();
        super.onResume();
    }

    @Override
    protected void onDestroy() {
        agentWeb.getWebLifeCycle().onDestroy();
        super.onDestroy();
    }
}
